﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bussiness;

namespace WebApplication.Admin.Baocao
{
    public class BaoCaoCongNoNhaCungCap
    {
        public IQueryable<BaoCaoCongNoNcc> GetBaoCaoCongNoNcc(string ngay, string mancc)
        {
            var db = dataprovider.Entity.CONGNONCCs;
            return db.Where(t => t.TINHTRANG ==false && t.MANCC==mancc)
                   .Select(t => new BaoCaoCongNoNcc 
                   {
                      nhacungcap=t.NHACUNGCAP.TENNCC,
                      tongtientra=(int)t.TONGTIENTRA,
                      tiendatra=(int)t.TONGTIENDATRA,
                      tongno=(int)t.TONGNO,
                      ngay=ngay
                   });
        }
        public class BaoCaoCongNoNcc
        {
            public string nhacungcap { get; set; }
            public int tongtientra { get; set; }
            public int tiendatra { get; set; }
            public int tongno { get; set; }
            public string ngay { get; set; }
        }
    }
}